import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'bp_alicloud_push_method_channel.dart';

abstract class BpAlicloudPushPlatform extends PlatformInterface {
  /// Constructs a BpAlicloudPushPlatform.
  BpAlicloudPushPlatform() : super(token: _token);

  static final Object _token = Object();

  static BpAlicloudPushPlatform _instance = MethodChannelBpAlicloudPush();

  /// The default instance of [BpAlicloudPushPlatform] to use.
  ///
  /// Defaults to [MethodChannelBpAlicloudPush].
  static BpAlicloudPushPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [BpAlicloudPushPlatform] when
  /// they register themselves.
  static set instance(BpAlicloudPushPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<bool?> bindAccount(String account) {
    throw UnimplementedError('bindAccount() has not been implemented.');
  }

  Future<bool?> unbindAccount() {
    throw UnimplementedError('unbindAccount() has not been implemented.');
  }

  void listenerEvent(Function(dynamic data) onData) {
    throw UnimplementedError('listenEvent() has not been implemented.');
  }

  void receiver(Function(dynamic data) onData) {
    throw UnimplementedError('receiver() has not been implemented.');
  }
}
